package appfight.map;

import java.util.ArrayList;

import org.anddev.andengine.entity.sprite.Sprite;
import org.anddev.andengine.util.HorizontalAlign;

import MyTickerText.MyTickerText;
import android.util.Log;
import appfight.map.GameObjectMap.Map_Object;

public class MapObject{

	 int positionX;
	 int positionY;
	 Map_Object _objectType;
	 GameObjectMap _objectMap;
	 
	 int _conversationCount = 0;
	 
	 Sprite _objectSprite;
	 
	 public ArrayList<String> talkList = new ArrayList<String>();
	 
	 public MapObject(Map_Object objectType)
	 {
		 _objectType = objectType;
	 }
	 
	 public void setPositionX(int x)
	 {
		 positionX = x;
	 }
	 public void setPositionY(int y)
	 {
		 positionY = y;
	 }
	 public int getPositionX()
	 {
		 return positionX;
	 }
	 public int getPositionY()
	 {
		 return positionY;
	 }
	 
	 public Map_Object getObjectType()
	 {
		 return _objectType;
	 }
	 
	 public void setObjectMap(GameObjectMap objectMap)
	 {
		 _objectMap = objectMap;
	 }
	 
	 public void Action()
	 {
		 Log.d("test", _conversationCount + "con" +talkList.size());
		 if(talkList.size()>_conversationCount)
		 {
			 _objectMap.TextSay(talkList.get(_conversationCount));
			 _conversationCount++;
		 }else
		 {
			 _objectMap.EndConversation();
			 _conversationCount = 0;
			 TalkEnd();
		 }
	 }
	 
	 public void TalkEnd(){}
}
